package guiservice.server.logic;

import java.util.concurrent.atomic.AtomicLong;

public class UidGenerator {

    private static UidGenerator instance;

    public static UidGenerator getInstance() {
        if (instance == null) {
            instance = new UidGenerator();
        }
        return instance;
    }

    private final AtomicLong counter = new AtomicLong(1);

    public long getNextUid() {
        return counter.incrementAndGet();
    }

}
